import requests
import json
import time  # 导入time模块用于计算耗时

url = "http://172.22.119.246:8880/heroConfig/query"

payload = json.dumps({
  "sysId": 44,
  "camp": "1",
  "pageIndex": 1,
  "pageSize": 100
})
headers = {
   'Content-Type': 'application/json'
}

# 记录开始时间
start_time = time.time()

response = requests.request("POST", url, headers=headers, data=payload)

# 记录结束时间并计算耗时
end_time = time.time()
elapsed_time = end_time - start_time

print(f"请求耗时: {elapsed_time:.4f} 秒")
print(response.text)